NPString uuid,
gboolean enabled)
{
- const gchar *uuid_str = uuid.UTF8Characters;
+ gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
if (!uuid_is_valid (uuid_str))
return FALSE;
NULL, /* callback */
NULL /* user_data */);
+ g_free (uuid_str);
+
return TRUE;
}
NPString uuid,
NPString version_tag)
{
- const gchar *uuid_str = uuid.UTF8Characters;
+ gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
if (!uuid_is_valid (uuid_str))
return FALSE;
NULL, /* callback */
NULL /* user_data */);
+ g_free (uuid_str);
+
return TRUE;
}
{
GError *error = NULL;
GVariant *res;
- const gchar *uuid_str;
+ gchar *uuid_str;
- uuid_str = uuid.UTF8Characters;
+ uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
if (!uuid_is_valid (uuid_str))
return FALSE;
NULL, /* cancellable */
&error);
+ g_free (uuid_str);
+
if (!res)
{
g_warning ("Failed to uninstall extension: %s", error->message);
{
GError *error = NULL;
GVariant *res;
- const gchar *uuid_str;
+ gchar *uuid_str;
- uuid_str = uuid.UTF8Characters;
+ uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
if (!uuid_is_valid (uuid_str))
return FALSE;
NULL, /* cancellable */
&error);
+ g_free (uuid_str);
+
if (!res)
{
g_warning ("Failed to retrieve extension metadata: %s", error->message);
{
GError *error = NULL;
GVariant *res;
- const gchar *uuid_str;
+ gchar *uuid_str;
- uuid_str = uuid.UTF8Characters;
+ uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
if (!uuid_is_valid (uuid_str))
return FALSE;
NULL, /* cancellable */
&error);
+ g_free (uuid_str);
+
if (!res)
{
g_warning ("Failed to retrieve errors: %s", error->message);